#ifndef BUTTON_H
#define BUTTON_H

#include <boost/signals2.hpp>
#include "view.h"
class ButtonSkin;

class Button : public View {
public:
     typedef boost::signals2::signal<void ()> OnClick;

     Button(ButtonSkin *pSkin, Point start=Point());
     void paint(bool all=false);
     void mouseDown(Point p, int button);
     void mouseUp(Point p, int button);
     void mouseExit(Point p);
     boost::signals2::connection onClick(const OnClick::slot_type &callback);

private:
     ButtonSkin *m_pSkin;
     bool m_buttonDown;
     OnClick m_onClick;
};

#endif
